package com.kitty.game.task.service.taskHandler;

import com.kitty.common.utils.SpringUtils;
import com.kitty.game.task.TaskDataPool;

import java.util.HashMap;
import java.util.Map;

public enum TaskButtonHideHelper {
    INSTANCE;

    private static final Map<Integer, TaskHandler> handlers = new HashMap<>();

    public void init(Integer taskId, TaskHandler taskHandler) {
        handlers.put(taskId, taskHandler);
    }

    public TaskHandler getTaskHandler(Integer taskId) {
        return handlers.get(taskId);
    }

    public Map<Integer, TaskHandler> getHandlers() {
        return handlers;
    }

    static {
        /**阵营选择处理*/
        INSTANCE.init(TaskDataPool.CAMP_SELECTION, SpringUtils.getBean(CampSelectionTaskHandler.class));
    }
}
